package com.eian.boot.module.system.dept.model.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户部门视图实体
 * 对应数据库视图 v_user_dept
 *
 * @author alex.meng
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "v_user_dept")
public class VUserDeptEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @Column(value = "user_id")
    private Long userId;

    /**
     * 用户名
     */
    @Column(value = "username")
    private String username;

    /**
     * 用户昵称
     */
    @Column(value = "nickname")
    private String nickname;

    /**
     * 用户状态
     */
    @Column(value = "user_status")
    private Integer userStatus;

    /**
     * 部门ID
     */
    @Column(value = "dept_id")
    private Long deptId;

    /**
     * 是否主部门
     */
    @Column(value = "is_main")
    private Integer isMain;

    /**
     * 部门名称
     */
    @Column(value = "dept_name")
    private String deptName;

    /**
     * 部门编码
     */
    @Column(value = "dept_code")
    private String deptCode;

    /**
     * 父部门ID
     */
    @Column(value = "dept_parent_id")
    private Long deptParentId;

    /**
     * 祖级列表
     */
    @Column(value = "dept_ancestors")
    private String deptAncestors;

    /**
     * 部门状态
     */
    @Column(value = "dept_status")
    private Integer deptStatus;
}

